import _import from '@/router/_import'
import Layout from '@/views/layout'

/**
 * 内容管理系统路由表
 */
export const CmsRouterMap = [
    {
        path: '',
        component: Layout,
        redirect: '/dashboard',
        noDropDown: true,
        children: [
            {
                path: 'dashboard',
                name: '仪表盘',
                icon: 'el-icon-location-outline',
                component: _import('dashboard/Cms')
            }
        ]
    },
    {
        path: '/cms/channel',
        name: '栏目管理',
        icon: 'el-icon-menu',
        component: Layout,
        redirect: '/cms/channel/list',
        noDropDown: true,
        children: [
            {
                path: 'list',
                name: '栏目列表',
                component: _import('cms/channel/List'),
            },
            {
                path: 'form',
                name: '栏目表单',
                component: _import('cms/channel/Form'),
            }
        ]
    },
    {
        path: '/cms/content',
        name: '内容管理',
        icon: 'el-icon-menu',
        component: Layout,
        redirect: '/cms/content/list',
        noDropDown: true,
        children: [
            {
                path: 'list',
                name: '内容列表',
                component: _import('cms/content/List'),
            },
            {
                path: 'form',
                name: '内容表单',
                component: _import('cms/content/Form'),
            }
        ]
    },
    {
        path: '/cms/data',
        name: '数据中心',
        component: Layout,
        icon: 'el-icon-location-outline',
        children: [
            {
                path: 'content',
                name: '流量统计',
                icon: 'el-icon-menu',
                component: _import('cms/content/index'),
                redirect: '/cms/content/list',
                children: [
                    {
                        path: 'list',
                        name: '趋势分析',
                        component: _import('cms/content/List'),
                    },
                    {
                        path: 'add',
                        name: '栏目访问量排行',
                        component: _import('cms/content/List'),
                    }
                ]
            },
            {
                path: 'content',
                name: '来源分析',
                icon: 'el-icon-menu',
                component: _import('cms/content/index'),
                redirect: '/cms/content/list',
                children: [
                    {
                        path: 'list',
                        name: '来源分类',
                        component: _import('cms/content/List'),
                    },
                    {
                        path: 'add',
                        name: '搜索引擎',
                        component: _import('cms/content/List'),
                    },
                    {
                        path: 'add',
                        name: '来访域名',
                        component: _import('cms/content/List'),
                    },
                    {
                        path: 'add',
                        name: '来访地区',
                        component: _import('cms/content/List'),
                    },
                    {
                        path: 'add',
                        name: '搜索词',
                        component: _import('cms/content/List'),
                    }
                ]
            },
            {
                path: 'content',
                name: '受访分析',
                icon: 'el-icon-menu',
                component: _import('cms/content/index'),
                redirect: '/cms/content/list',
                children: [
                    {
                        path: 'list',
                        name: '受访页面',
                        component: _import('cms/content/List'),
                    },
                    {
                        path: 'add',
                        name: '入口页面',
                        component: _import('cms/content/List'),
                    }
                ]
            },
            {
                path: 'content',
                name: '忠诚度',
                icon: 'el-icon-menu',
                component: _import('cms/content/index'),
                redirect: '/cms/content/list',
            }
        ]
    },

    {
        path: '/cms/user',
        name: '用户管理',
        component: Layout,
        icon: 'el-icon-location-outline',
        children: [
            {
                path: 'content',
                name: '会员管理',
                icon: 'el-icon-menu',
                component: Layout
            },
            {
                path: 'content',
                name: '会员组管理',
                icon: 'el-icon-menu',
                component: Layout
            }
        ]
    },

    {
        path: '/cms/user',
        name: '运营管理',
        component: Layout,
        icon: 'el-icon-location-outline',
        children: [
            {
                path: 'content',
                name: '友情链接',
                icon: 'el-icon-menu',
                component: Layout
            },
            {
                path: 'content',
                name: '广告管理',
                icon: 'el-icon-menu',
                component: Layout
            },
            {
                path: 'content',
                name: '转账管理',
                icon: 'el-icon-menu',
                component: Layout
            }
        ]
    },

    {
        path: '/cms/user',
        name: '辅助',
        component: Layout,
        icon: 'el-icon-location-outline',
        children: [
            {
                path: 'content',
                name: '定时任务',
                icon: 'el-icon-menu',
                component: Layout
            },
            {
                path: 'content',
                name: '二维码生成',
                icon: 'el-icon-menu',
                component: Layout
            },
            {
                path: 'content',
                name: '字典',
                icon: 'el-icon-menu',
                component: Layout
            }
        ]
    },

    {
        path: '/cms/user',
        name: '界面',
        component: Layout,
        icon: 'el-icon-location-outline',
        children: [
            {
                path: 'content',
                name: '模板管理',
                icon: 'el-icon-menu',
                component: Layout
            },
            {
                path: 'content',
                name: '资源管理',
                icon: 'el-icon-menu',
                component: Layout
            }
        ]
    },

    {
        path: '/cms/config',
        name: '配置',
        component: Layout,
        icon: 'el-icon-location-outline',
        children: [
            {
                path: 'site',
                name: '站点设置',
                icon: 'el-icon-menu',
                component: _import('cms/site/List')
            },
            {
                path: 'site/form',
                name: '站点表单',
                icon: 'el-icon-menu',
                hidden: true,
                component: _import('cms/site/Form')
            },
            {
                path: 'content',
                name: 'FTP管理',
                icon: 'el-icon-menu',
                component: Layout
            }
        ]
    }
]
